<script type="text/javascript">

  function save() {
    jQuery('#form').jaAction({
      filter : [
        { target : "#title", params : "&filter=notnull&title=그룹명" }
      ],

      formAttr : '&method=post&action=procGroupAdminInsert.me',

      param : _mei_gb_params,
      ask : 'insert' , 
      afterSend : function() { location.reload(); }
    });
  }

  function del(target_orl) {
    jQuery('#form').jaAction({ 
      formAttr : 'action=./procGroupAdminDelete.me&method=post', 
      param : _mei_gb_params + '&group_orl=' + target_orl , 
      ask : 'del' ,
      afterSend : function() { location.reload(); }
    });
  }

</script>

<div id="sub_column_content">
<#include "admin.sub.html">

  <form id="form" method="get" action="?">
  <div class="document-list">
  <table cellspacing="0" border="1" summary="document list" class="table-list">
  <colgroup>
  <col width="100"><col><col width="100"><col width="100"><col width="100">
  </colgroup>
  <thead>
    <tr>
      <th scope="col"></th>
      <th scope="col">그룹명</th>
      <th scope="col">설명</th>
      <th scope="col">기본그룹</th>
      <th scope="col">등록일</th>
    </tr>
  </thead>
  <tbody>

    <#list O.listGroup as obj>
    <tr>
      <td>
        <a href="./dispGroupAdminUpdate.me${param.get('?group_orl=${obj.group_orl}')?html}" title="설정"><span class="iconset setting"></span></a>
        <a href="javascript:del('${obj.group_orl}');" title="삭제"><span class="iconset delete"></span></a>
      </td>
      <td class="title">${obj.title}</td>
      <td>${obj.description}</td>
      <td>${obj.is_default!'N'}</td>
      <td><#if obj.regdate != ''>${obj.regdate?datetime("yyyyMMddHHmmss")?string("yyyy/MM/dd")}</#if></td>
    </tr>
    </#list>
    <#if !O.listGroup?has_content>
    <tr><td colspan="5" class="zero">등록된 자료가 없습니다.</td></tr>
    </#if>

  </tbody>
  </table>
  </div>

  <h4 class="document-sub-title"><span class="iconset title"></span> 그룹등록</h4>
  <div class="document-write">
  <table class="table-write" summary="document write" border="1" cellspacing="0">
  <colgroup>
  <col width="100"><col>
  </colgroup>
  <tbody>

    <tr>
    <th scope="row">그룹명</th>
    <td>
      <div class="item">
        <input type="text" class="i_text w250" id="title" name="title" value="" />
      </div>
    </td>
    </tr>

    <tr>
    <th scope="row">기본그룹</th>
    <td>
      <div class="item">
        <input type="checkbox" id="is_default" name="is_default" value="Y" class="i_check" /> <label for="is_default">회원가입시 기본 그룹으로 설정됩니다.</label>
      </div>
    </td>
    </tr>

    <tr>
    <th scope="row">설명</th>
    <td>
      <div class="item">
        <textarea class="i_text w95p" id="description" name="description" cols="50" rows="5"></textarea>
      </div>
    </td>
    </tr>

  </tbody>
  </table>
  </div>

  <div class="document-foot-menu">
    <span class="button medium icon"><button type="button" onclick="save();"><span class="iconset accept"></span>저장</button></span>
  </div>

  </form>
</div>
